function f_prime = own_deriv(f, x0, i, diff)

    offset = zeros(size(x0));
    offset(i) = diff;
    
    f_prime = (f(x0+offset) - f(x0-offset))/ (2*diff);


end